<template>
  <div>
    <div class="star">
      <img src="@/assets/phoneTop.jpg" alt class="phoneTop" />

      <topBars msg="我的收藏" />

      <posts :post="post" v-for="post in postList" :key="post.id" />
    </div>
  </div>
</template>

<script>
import topBars from "@/components/TopBars";
import posts from "@/components/Posts";

export default {
  components: {
    topBars,
    posts
  },
  data () {
    return {
      postList:[]
    }
  },
  created() {
    this.$axios({
      url: "/user_star"
    }).then(res => {
      // console.log('收藏文章列表结果',res);

      this.postList = res.data.data;

      console.log('收藏文章列表内容',this.postList);
    });
  }
};
</script>

<style lang="less" scoped>
.phoneTop {
  width: 100%;
}
</style>